// ****************************************************************************** 
// Copyright     :  Copyright (C) 2018, Hisilicon Technologies Co. Ltd.
// File name     :  isp_prescaler_regs_c_union_define.h
// Project line  :  Platform And Key Technologies Development
// Department    :  CAD Development Department
// Author        :  xxx
// Version       :  1.0
// Date          :  2013/3/10
// Description   :  The description of xxx project
// Others        :  Generated automatically by nManager V4.2 
// History       :  xxx 2018/03/19 14:38:19 Create file
// ******************************************************************************

#ifndef __ISP_PRESCALER_REGS_C_UNION_DEFINE_H__
#define __ISP_PRESCALER_REGS_C_UNION_DEFINE_H__

/* Define the union U_HCROP */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_0   : 6  ; /* [31:26] */
        unsigned int    ihleft  : 13  ; /* [25:13] */
        unsigned int    ihright : 13  ; /* [12:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_HCROP;

/* Define the union U_VCROP */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_1    : 19  ; /* [31:13] */
        unsigned int    ivbottom : 13  ; /* [12:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_VCROP;

/* Define the union U_MODE */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_2  : 31  ; /* [31:1] */
        unsigned int    bypass : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_MODE;

/* Define the union U_FORCE_CLK_ON_CFG */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_3        : 31  ; /* [31:1] */
        unsigned int    force_clk_on : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_FORCE_CLK_ON_CFG;


//==============================================================================
/* Define the global struct */
typedef struct
{
    volatile U_HCROP            HCROP            ; /* 0 */
    volatile U_VCROP            VCROP            ; /* 4 */
    volatile U_MODE             MODE             ; /* 8 */
    volatile U_FORCE_CLK_ON_CFG FORCE_CLK_ON_CFG ; /* C */

} S_isp_prescaler_regs_REGS_TYPE;

/* Declare the struct pointor of the module isp_prescaler_regs */
extern volatile S_isp_prescaler_regs_REGS_TYPE *gopisp_prescaler_regsAllReg;

/* Declare the functions that set the member value */
int iSetHCROP_ihleft(unsigned int uihleft);
int iSetHCROP_ihright(unsigned int uihright);
int iSetVCROP_ivbottom(unsigned int uivbottom);
int iSetMODE_bypass(unsigned int ubypass);
int iSetFORCE_CLK_ON_CFG_force_clk_on(unsigned int uforce_clk_on);

#endif // __ISP_PRESCALER_REGS_C_UNION_DEFINE_H__
